#ifndef __UTILS_H__
#define __UTILS_H__

#include <string>
#include <set>
#include <tuple>
#include "cpp-gen/FormalParser.h"

namespace antlr4::tree
{
    class ParseTree;
    class TerminalNode;
    class ErrorNode;
}

namespace cyclone::parser
{
    using antlr4::ParserRuleContext;
    using antlr4::Token;
    using antlr4::tree::ErrorNode;
    using antlr4::tree::ParseTree;
    using antlr4::tree::TerminalNode;

    template <typename T, typename... Ts>
    constexpr auto isOneOf()
    {
        return (std::is_same_v<T, Ts> || ...);
    };
    class Utils
    {
    public:
        static bool shouldIgnore(ParseTree *tree);
        static bool shouldIgnore(ParseTree *tree, ssize_t index);
        static const std::set<std::string> &getReservedKeywords();
        static std::string getRuleName(int ruleIndex);
        static std::string getNonSemanticErrorInfoTip();
    };

} // namespace cyclone::parser

#endif // __UTILS_H__
